//
//  ViewController.m
//  Erc_Day01_homework_03
//
//  Created by aaaaaa on 16/6/3.
//  Copyright © 2016年 dllo. All rights reserved.
//


#import "ViewController.h"

#define WEIGHT 414
#define HEIGHT 736
#define AWEIGHT (WEIGHT / 5)
#define AHEIGHT (HEIGHT / 8)
#define COLORARC  [UIColor colorWithRed:(arc4random()%256/255.0) green:(arc4random()%256/255.0) blue:(arc4random()%256/255.0) alpha:1.0]

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    for (int i = 0; i < 5; i++) {
        for (int j = 0; j < 8; j++) {
            UIView *view = [[UIView alloc] initWithFrame:CGRectMake(i * AWEIGHT, j * AHEIGHT, AWEIGHT, AHEIGHT)];
            view.backgroundColor = COLORARC;
            [self.view addSubview:view];
            [view release];
        }
    }
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
